<html><head><title>Plot regression terms for a specified parameter of a GAMLSS object</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="Rchm.css">
</head>
<body>

<table width="100%"><tr><td>term.plot(gamlss)</td><td align="right">R Documentation</td></tr></table><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e">
<param name="keyword" value="R:   term.plot">
<param name="keyword" value=" Plot regression terms for a specified parameter of a GAMLSS object">
</object>


<h2>Plot regression terms for a specified parameter of a GAMLSS object</h2>


<h3>Description</h3>

<p>
Plots regression terms against their predictors, optionally with
standard errors and partial residuals added. It is almost identical to the R function <code>termplot</code> 
suitable changed to apply to GAMLSS objects.
</p>


<h3>Usage</h3>

<pre>
term.plot(object, what = c("mu", "sigma", "nu", "tau"), data = NULL, 
          envir = environment(formula(object)), 
          partial.resid = FALSE, rug = FALSE, 
          terms = NULL, se = FALSE, xlabs = NULL, ylabs = NULL, 
          main = NULL, col.term = 2, lwd.term = 1.5, 
          col.se = "orange", lty.se = 2, lwd.se = 1, 
          col.res = "gray", cex = 1, pch = par("pch"), 
          col.smth = "darkred", lty.smth = 2, 
          span.smth = 2/3, 
          ask = interactive() &amp;&amp; nb.fig &lt; n.tms &amp;&amp; .Device != "postscript", 
          use.factor.levels = TRUE, smooth = NULL, ...)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>object</code></td>
<td>
a GAMLSS object</td></tr>
<tr valign="top"><td><code>what</code></td>
<td>
the required parameter of the GAMLSS distribution</td></tr>
<tr valign="top"><td><code>data</code></td>
<td>
data frame in which variables in <code>object</code> can be found</td></tr>
<tr valign="top"><td><code>envir</code></td>
<td>
environment in which variables in <code>object</code> can be found </td></tr>
<tr valign="top"><td><code>partial.resid</code></td>
<td>
logical; should partial residuals be plotted?</td></tr>
<tr valign="top"><td><code>rug</code></td>
<td>
add rugplots (jittered 1-d histograms) to the axes?</td></tr>
<tr valign="top"><td><code>terms</code></td>
<td>
which terms to plot (default 'NULL' means all terms) </td></tr>
<tr valign="top"><td><code>se</code></td>
<td>
plot pointwise standard errors?</td></tr>
<tr valign="top"><td><code>xlabs</code></td>
<td>
vector of labels for the x axes </td></tr>
<tr valign="top"><td><code>ylabs</code></td>
<td>
vector of labels for the y axes </td></tr>
<tr valign="top"><td><code>main</code></td>
<td>
logical, or vector of main titles;  if 'TRUE', the model's
call is taken as main title, 'NULL' or 'FALSE' mean no
titles.</td></tr>
<tr valign="top"><td><code>col.term, lwd.term</code></td>
<td>
color and width for the "term curve", see 'lines'.</td></tr>
<tr valign="top"><td><code>col.se, lty.se, lwd.se</code></td>
<td>
color, line type and line width for the
"twice-standard-error curve" when 'se = TRUE'.</td></tr>
<tr valign="top"><td><code>col.res, cex, pch</code></td>
<td>
color, plotting character expansion and type for
partial residuals, when 'partial.resid = TRUE', see 'points'.</td></tr>
<tr valign="top"><td><code>lty.smth,col.smth, span.smth</code></td>
<td>
Passed to 'smooth'</td></tr>
<tr valign="top"><td><code>ask</code></td>
<td>
logical; if 'TRUE', the user is asked before each plot, see
'par(ask=.)'.</td></tr>
<tr valign="top"><td><code>use.factor.levels</code></td>
<td>
Should x-axis ticks use factor levels or numbers for
factor terms? </td></tr>
<tr valign="top"><td><code>smooth</code></td>
<td>
'NULL' or a function with the same arguments as
'panel.smooth' to draw a smooth through the partial residuals
for non-factor terms</td></tr>
<tr valign="top"><td><code>...</code></td>
<td>
other graphical parameters</td></tr>
</table>

<h3>Details</h3>

<p>
The function uses the <code>lpred</code> function of GAMLSS.  
The 'data' argument should rarely be needed, but in some cases
'termplot' may be unable to reconstruct the original data frame.
Using 'na.action=na.exclude' makes these problems less likely.
Nothing sensible happens for interaction terms.
</p>


<h3>Value</h3>

<p>
a plot of fitted terms.</p>

<h3>Note</h3>




<h3>Author(s)</h3>

<p>
Mikis Stasinopoulos based on the existing termplot() function
</p>


<h3>References</h3>

<p>
Rigby, R. A. and  Stasinopoulos D. M. (2005). Generalized additive models for location, scale and shape,(with discussion), 
<EM>Appl. Statist.</EM>, <B>54</B>, part 3, pp 507-554.
</p>
<p>
Stasinopoulos D. M., Rigby R.A. and Akantziliotou C. (2006) Instructions on how to use the GAMLSS package in R.
Accompanying documentation in the current GAMLSS  help files, (see also  <a href="http://www.gamlss.com/">http://www.gamlss.com/</a>).
</p>
<p>
Stasinopoulos D. M. Rigby R.A. (2007) Generalized additive models for location scale and shape (GAMLSS) in R.
<EM>Journal of Statistical Software</EM>, Vol. <B>23</B>, Issue 7, Dec 2007, <a href="http://www.jstatsoft.org/v23/i07">http://www.jstatsoft.org/v23/i07</a>.
</p>


<h3>See Also</h3>

<p>
<code><a onclick="findlink('stats', 'termplot.html')" style="text-decoration: underline; color: blue; cursor: hand">termplot</a></code>
</p>


<h3>Examples</h3>

<pre>
data(aids)
a&lt;-gamlss(y~cs(x,df=8)+qrt,data=aids,family=NBI)
term.plot(a, se=TRUE)
rm(a)
</pre>

<script Language="JScript">
function findlink(pkg, fn) {
var Y, link;
Y = location.href.lastIndexOf("\\") + 1;
link = location.href.substring(0, Y);
link = link + "../../" + pkg + "/chtml/" + pkg + ".chm::/" + fn;
location.href = link;
}
</script>


<hr><div align="center">[Package <em>gamlss</em> version 1.7-9 <a href="00Index.html">Index]</a></div>

</body></html>
